﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Person.DS;

namespace Person
{
    public class Factory
    {
        public static IPerson list = null;
        static Factory()
        {
            add(new DS_CSV());
            add(new DS_DB());
        }
        static void add(IPerson node)
        {
            node.Next = list;
            list = node;
        }
        public static IPerson GetInstance(string ext, string path)
        {
            IPerson ds = null;
            ds = list.isReady(ext, path);
            return ds;
        }
    }
}
